package com.banciyuan.bcywebview.biz.circles;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.LinearLayout;

import com.banciyuan.bcywebview.R;
import com.banciyuan.bcywebview.base.activity.BaseActivity;
import com.banciyuan.bcywebview.base.helper.ActionbarHelper;
import com.banciyuan.bcywebview.biz.circles.smooth.fragment.CircleSmoothUserTopFragment;
import com.banciyuan.bcywebview.utils.intent.gotoUtil;

/**
 * Created by squall on 2017/4/17.
 */

public class CircleTopUserActivity extends BaseActivity {

    private LinearLayout container;
    private String id;

    private View mActionBarView;
    private ActionbarHelper mActionbarHelper;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_container);
        initActionbar();
        initArgs();
        initUi();
    }

    @Override
    protected void initActionbar() {
        mActionBarView = findViewById(R.id.base_action_bar);
        mActionbarHelper = new ActionbarHelper(this, mActionBarView);
        mActionbarHelper.setTitle(getString(R.string.high_producion));
    }

    @Override
    protected void initUi() {
        container = (LinearLayout) findViewById(R.id.fragment_container);

        CircleSmoothUserTopFragment circleSmoothUserTopFragment = new CircleSmoothUserTopFragment();
        Bundle bundle = new Bundle();
        bundle.putString("id", id);
        circleSmoothUserTopFragment.setArguments(bundle);

        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction fts = fm.beginTransaction();
        fts.add(R.id.fragment_container, circleSmoothUserTopFragment);
        fts.show(circleSmoothUserTopFragment);
        fts.commit();

    }

    @Override
    protected void initArgs() {
        id = getIntent().getStringExtra(gotoUtil.INTENT_VALUE_ONE);
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {

    }
}
